﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TMT.Data.Base;
using TMT.Data.Entities;
using TMT.Data;

namespace TMT.Admin.UserAccount
{
    public partial class UcAccountList : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Initialize();
        }

        private void Initialize()
        {
            IList<AccountMaster> accountList = AccountService.Instance.GetAll();
            IList<TMTUserAccount> bindSource = new List<TMTUserAccount>();
            for (int i = 0; i < accountList.Count; i++)
            {
                bindSource.Add(new TMTUserAccount()
                {
                    BaseInfo = accountList[i],
                });
            }
            rptUsers.DataSource = bindSource;
            rptUsers.DataBind();
        }
    }
}